import get_params from '@dfeidao/atom-nodejs/authorization/get-params';
import { ICommonParams, IHeaders } from '@dfeidao/atom-nodejs/interfaces';
import whoami from '@dfeidao/atom-nodejs/msg/whoami';

interface Message {
	filter: {};
}

export default async function atom(msgs: Message, action_id: string, session_id: string) {
	const user = await whoami(action_id, session_id);
	const msg = {
		cookie: { sessionid: session_id },
		data: {},
		headers: {},
		params: {},
		query: {},
		remote_address: '',
		spaceid: "",
		url: ""
	} as ICommonParams;
	const hearders = {
		actionid: action_id
	} as IHeaders;
	const productid = user.productid;

	const params = await get_params(msg, hearders, productid, '3');
	return params;
}
